home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Games Collection 1 / software vault.zip / software vault / CDR10 / YICN23.ZIP / INCLUDE / SCRIPT.H < prev    next >
C/C++ Source or Header  |  1992-11-23  |  805b  |  30 lines

  1. #ifndef SCRIPT.H
  2.  
  3. #define SCRIPT.H
  4.  
  5. #include <stddef.h>
  6. #include "stddefs.h"
  7.  
  8. class scriptNode
  9. {
  10. public:
  11.   enum scriptCommand {doNothing, fineMoveRel, fineSlide, turn};
  12.   scriptNode * nextLine; // what it should do next.
  13.   byte command;
  14.   int mapX, mapY;
  15.   int squareX, squareY;
  16.   scriptNode() {nextLine = NULL; command = mapX = mapY = squareX = squareY = 0;};
  17.   scriptNode(byte icommand, int ix, int iy, int isquareX, int isquareY);
  18. };
  19.  
  20. class script
  21. {
  22. public:
  23.   scriptNode * firstLine, * lastLine, * thisLine;
  24.   script() {firstLine = thisLine = lastLine = NULL;}
  25.   void addLine(byte command, int mapX, int mapY, int squareX, int squareY);
  26.   void addCommand(scriptNode::scriptCommand command, int mapX, int mapY, int squareX, int squareY);
  27.   void advanceLine(void);
  28. };
  29. #endif
  30.